package com.inetools.gwt.gajaxs.client;

import com.google.gwt.event.dom.client.ClickEvent;
import com.google.gwt.uibinder.client.UiBinder;
import com.google.gwt.uibinder.client.UiField;
import com.google.gwt.uibinder.client.UiHandler;
import com.google.gwt.user.client.ui.AbsolutePanel;
import com.google.gwt.user.client.ui.Button;
import com.google.gwt.user.client.ui.DialogBox;
import com.google.gwt.user.client.ui.HTMLPanel;
import com.google.gwt.user.client.ui.Label;
import com.google.gwt.user.client.ui.SimplePanel;
import com.google.gwt.user.client.ui.Widget;

public class PicasaAlbumSlideshowPopupDialogBinder extends SimplePanel implements
		PicasaAlbumSlideshowPopupDialogService {
	
	public PicasaAlbumSlideshowPopupDialogBinder( 
			UiBinder<Widget, PicasaAlbumSlideshowPopupDialogBinder> uiBinder) {
		super();
		add( uiBinder.createAndBindUi( this));
	}
	

	/*
	 * All @UiField and @UiHandler are defined as public in order to use this class 
	 * in other package with different .ui.xml file. Otherwise, compilation will fail due to 
	 * visibility of those fields and handlers.
	 */
	
	@UiField public Label captionLabelCell;
	@Override
	public Label getCaptionLabelCell() {
		return captionLabelCell;
	}

	@UiField public Button closeButtonCell;
	@Override
	public Button getCloseButtonCell() {
		return closeButtonCell;
	}
	@UiHandler( "closeButtonCell")
	public void handleClick( ClickEvent event) {
		dialogBoxCell.hide();
	}

	@UiField public DialogBox dialogBoxCell;
	@Override
	public DialogBox getDialogBoxCell() {
		return dialogBoxCell;
	}
	
	@UiField public HTMLPanel slideshowObjectWrapperHTMLPanel;
	@Override
	public HTMLPanel getSlideshowObjectWrapperHTMLPanel() {
		return slideshowObjectWrapperHTMLPanel;
	}
	
	@UiField public AbsolutePanel centerAbsolutePanel;
	@Override
	public AbsolutePanel getCenterAbsolutePanelCellCell() {
		return centerAbsolutePanel;
	}
	
}
